﻿/// <reference path="jquery.dataTables.min.js" />

$(document).ready(function () {
	var oTable = $('#budgetDataTable').dataTable({
		"bServerSide": true,
		"bJQueryUI": true,
		"bAutoWidth": false,
		"sScrollX": "100%",    
		"sAjaxSource": "budget/AjaxHandler",
		"bProcessing": true,
		"oLanguage": {
			"sSearch": " "
		},
		"aoColumns": [
						{ "sName": "ID",
							"bSearchable": false,
							"bSortable": false,
							"fnRender": function (oObj) {
								return '<a href=\"budget/Details/' + oObj.aData[0] + '\">Details</a> <br/> '
								+ '<a href=\"budget/Edit/' + oObj.aData[0] + '\">Edit</a> <br/> '
								+ '<a href=\"budget/Delete/' + oObj.aData[0] + '\">Delete</a>';
							}
						},
						{ "sName": "account_sap" },
						{ "sName": "sap_description" },
						{ "sName": "date" },
						{ "sName": "unti" },
						{ "sName": "reference_no" },
						{ "sName": "section" },
						{ "sName": "description" },
						{ "sName": "expense_amount" },
						{ "sName": "budgeted_amount" },
						{ "sName": "remark" },
						{ "sName": "entry_date" },
					]
	});
});